autogen.sh: rely on VPATH for submodules' Makefile-*.am.inc
authorSimon McVittie <smcv@debian.org>
Sun, 12 Jun 2016 09:31:29 +0000 (10:31 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 13 Jun 2016 00:23:03 +0000 (00:23 +0000)
This avoids hard-coding the autogen-time ${srcdir} into our build
system, and might fix "make distcheck".

We don't need to specify ${srcdir} explicitly in the various variables,
because Automake always uses make's VPATH feature to look in both
${builddir} and ${srcdir} at build time.

Signed-off-by: Simon McVittie <smcv@debian.org>
Closes: #337
Approved by: cgwalters

autogen.sh

index 0eb655502c4152195772e659fab39b3fa91cd17b..581f3dee8fcf06fea8cfc36d9c4e5ef04d915336 100755 (executable)
@@ -33,8 +33,8 @@ if ! test -f libglnx/README.md || ! test -f bsdiff/README.md; then
     git submodule update --init
 fi
 # Workaround automake bug with subdir-objects and computed paths
-sed -e 's,$(libglnx_srcpath),'${srcdir}/libglnx,g < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc
-sed -e 's,$(libbsdiff_srcpath),'${srcdir}/bsdiff,g < bsdiff/Makefile-bsdiff.am >bsdiff/Makefile-bsdiff.am.inc
+sed -e 's,$(libglnx_srcpath),libglnx,g' < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc
+sed -e 's,$(libbsdiff_srcpath),bsdiff,g' < bsdiff/Makefile-bsdiff.am >bsdiff/Makefile-bsdiff.am.inc
 
 autoreconf --force --install --verbose